import {getUserType} from "@/utils/auth";


const remainingRouter: AppRouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'layout',
    children: [],
    meta: {
      hidden: true
    }
  },
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'Home',
    meta: {
      title: '首页',
    },
    children: [
      {
        path: '/index',
        component: () => import('@/components/Hello/index.vue'),
        name: 'Index',
        meta: {
          title: '概览'
        }
      }
    ]
  },
  {
    path: '/order',
    component: () => import('@/layout/Layout.vue'),
    name: 'order',
    meta: {
      title: '业务处理',
      icon: 'ep:monitor'
    },
    children: [
      {
        path: 'manager',
        component: () => import('@/views/order/manager/index.vue'),
        name: 'manager',
        meta: {
          title: '1.订单管理',
          hidden: false,
        }
      },
      {
        path: 'order/refundOrder',
        component: () => import('@/views/order/refundOrder/index.vue'),
        name: 'order/refundOrder',
        meta: {
          title: '2.欠费用户明细',
          hidden: false,
          activeMenu: '/order/refundOrder'
        }
      },
      {
        path: 'employeeDetail',
        component: () => import('@/views/tool/employeeDetail/index.vue'),
        name: 'employeeDetail',
        meta: {
          title: '3.托管业务明细',
          activeMenu: '/tool/employeeDetail'
        }
      },

      {
        path: 'negotiation',
        component: () => import('@/views/tool/negotiation/manage/index.vue'),
        name: 'negotiation',
        meta: {
          title: '4.协商任务明细',
          activeMenu: '/tool/negotiation'
        }
      },
      {
        path: 'thaw',
        component: () => import('@/views/order/thaw/manage/index.vue'),
        name: 'thaw',
        meta: {
          title: '5.解冻任务明细',
          activeMenu: '/order/thaw'
        }
      },
      {
        path: 'maintenance',
        component: () => import('@/views/tool/maintenance/index.vue'),
        name: 'maintenance',
        meta: {
          title: '6.维护任务明细',
          activeMenu: '/tool/maintenance'
        }
      },
      // {
      //   path: 'sh',
      //   component: () => import('@/components/Hello/index.vue'),
      //   name: 'sh',
      //   meta: {
      //     title: '7.售后任务明细',
      //     activeMenu: '/tool/sh'
      //   }
      // },
      // {
      //   path: 'qt',
      //   component: () => import('@/components/Hello/index.vue'),
      //   name: 'qt',
      //   meta: {
      //     title: '8.其他任务明细',
      //     activeMenu: '/tool/qt'
      //   }
      // },
      {
        path: 'outOrder',
        component: () => import('@/views/order/outOrder/index.vue'),
        name: 'outOrder',
        meta: {
          title: '9.客户问题明细',
          activeMenu: '/order/outOrder'
        }
      },
      // {
      //   path: 'MissePhone',
      //   component: () => import('@/views/tool/MissePhone/index.vue'),
      //   name: 'MissePhone',
      //   meta: {
      //     title: '10.周报截图明细',
      //     activeMenu: '/tool/MissePhone'
      //   }
      // },
      {
        path: 'MissePhoneNew',
        component: () => import('@/views/tool/MissePhone/IndexNew.vue'),
        name: 'MissePhoneNew',
        meta: {
          title: '10.周报截图明细',
          activeMenu: '/tool/MissePhoneNew'
        }
      },

    ]
  },
  {
    path: '/enum',
    component: () => import('@/layout/Layout.vue'),
    name: 'enum',
    meta: {
      title: '基本资料配置',
      icon: 'ep:monitor'
    },
    children: [

      {
        path: 'Summary',
        component: () => import('@/views/tool/Summary/index.vue'),
        name: 'Summary',
        meta: {
          title: '收支统计',
          activeMenu: '/tool/Summary'
        }
      },
      {
        path: 'totalExpenses',
        component: () => import('@/views/tool/totalExpenses/index.vue'),
        name: 'totalExpenses',
        meta: {
          title: '收支管理',
          activeMenu: '/tool/totalExpenses'
        }
      },
      {
        path: 'agency',
        component: () => import('@/views/agency/index.vue'),
        name: 'agency',
        meta: {
          title: '中介资料明细',
        }
      },
      {
        path: 'EnumA',
        component: () => import('@/views/EnumList/EnumA/index.vue'),
        name: 'EnumA',
        meta: {
          title: '员工账号明细',
          hidden: false,
          activeMenu: '/EnumList/EnumA'
        }
      },
      {
        path: 'EnumB',
        component: () => import('@/views/EnumList/EnumB/index.vue'),
        name: 'EnumB',
        meta: {
          title: '手机号明细',
          hidden: false,
          activeMenu: '/EnumList/EnumB'
        }
      },
      {
        path: 'kfPhone',
        component: () => import('@/views/tool/kfPhone/index.vue'),
        name: 'kfPhone',
        meta: {
          title: '客服号码明细',
          hidden: false,
          activeMenu: '/tool/kfPhone'
        }
      },
      {
        path: 'ConfigContainer',
        component: () => import('@/views/tool/ConfigContainer/index.vue'),
        name: 'ConfigContainer',
        meta: {
          title: '温馨提示配置',
          hidden: false,
          activeMenu: '/tool/ConfigContainer'
        }
      },
      {
        path: 'PageNote',
        component: () => import('@/views/tool/PageNote/index.vue'),
        name: 'PageNote',
        meta: {
          title: '页面备注配置',
          hidden: false,
          activeMenu: '/tool/PageNote'
        }
      }

    ]
  },
  {
    path: '/login',
    component: () => import('@/views/Login/Login.vue'),
    name: 'Login',
    meta: {
      hidden: true,
      title: '登录',
      noTagsView: true
    }
  },
  {
    path: '/company',
    component: () => import('@/layout/Layout.vue'),
    name: 'company',
    meta: {
      title: '公司管理',
      icon: 'ep:avatar',
      hidden: false
    },
    children: [

      {
        path: 'account',
        component: () => import('@/views/company/user/index.vue'),
        name: 'account',
        meta: {
          title: '账号管理',
          activeMenu: '/company/account'
        }
      },
      {
        path: '',
        component: () => import('@/views/tool/Summary/index.vue'),
        name: '',
        meta: {
          title: '权限管理',
          activeMenu: ''
        }
      }
    ]
  }
]

const remainingRouterzhuguan: AppRouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'layout',
    children: [],
    meta: {
      hidden: true
    }
  },
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'Home',
    meta: {
      title: '首页',
    },
    children: [
      {
        path: '/index',
        component: () => import('@/components/Hello/index.vue'),
        name: 'Index',
        meta: {
          title: '概览'
        }
      }
    ]
  },
  {
    path: '/order',
    component: () => import('@/layout/Layout.vue'),
    name: 'order',
    meta: {
      title: '业务处理',
      icon: 'ep:monitor'
    },
    children: [
      {
        path: 'manager',
        component: () => import('@/views/order/manager/index.vue'),
        name: 'manager',
        meta: {
          title: '订单管理',
          hidden: false,
        }
      },
      {
        path: 'outOrder',
        component: () => import('@/views/order/outOrder/index.vue'),
        name: 'outOrder',
        meta: {
          title: '客户问题明细',
          activeMenu: '/order/outOrder'
        }
      },
      {
        path: 'negotiation',
        component: () => import('@/views/tool/negotiation/yg/index.vue'),
        name: 'negotiation',
        meta: {
          title: '协商业务明细',
          activeMenu: '/tool/negotiation'
        }
      },
      {
        path: 'maintenance',
        component: () => import('@/views/tool/maintenance/index.vue'),
        name: 'maintenance',
        meta: {
          title: '维护业务明细',
          activeMenu: '/tool/maintenance'
        }
      },
      {
        path: 'thaw',
        component: () => import('@/views/order/thaw/yg/index.vue'),
        name: 'thaw',
        meta: {
          title: '解冻业务明细',
          activeMenu: '/order/thaw'
        }
      },
      {
        path: 'employeeDetail',
        component: () => import('@/views/tool/employeeDetail/index.vue'),
        name: 'employeeDetail',
        meta: {
          title: '托管业务明细',
          activeMenu: '/tool/employeeDetail'
        }
      },
      // {
      //   path: 'MissePhone',
      //   component: () => import('@/views/tool/MissePhone/index.vue'),
      //   name: 'MissePhone',
      //   meta: {
      //     title: '周报截图明细',
      //     activeMenu: '/tool/MissePhone'
      //   }
      // },
      {
        path: 'MissePhoneNew',
        component: () => import('@/views/tool/MissePhone/IndexNew.vue'),
        name: 'MissePhoneNew',
        meta: {
          title: '10.周报截图明细',
          activeMenu: '/tool/MissePhoneNew'
        }
      },

    ]
  },
  {
    path: '/enum',
    component: () => import('@/layout/Layout.vue'),
    name: 'enum',
    meta: {
      title: '配置',
      icon: 'ep:monitor'
    },
    children: [
      {
        path: 'agency',
        component: () => import('@/views/agency/index.vue'),
        name: 'agency',
        meta: {
          title: '中介资料明细',
        }
      },
      {
        path: 'EnumA',
        component: () => import('@/views/EnumList/EnumA/index.vue'),
        name: 'EnumA',
        meta: {
          title: '员工账号明细',
          hidden: false,
          activeMenu: '/EnumList/EnumA'
        }
      },
      {
        path: 'EnumB',
        component: () => import('@/views/EnumList/EnumB/index.vue'),
        name: 'EnumB',
        meta: {
          title: '手机号明细',
          hidden: false,
          activeMenu: '/EnumList/EnumB'
        }
      },
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/Login/Login.vue'),
    name: 'Login',
    meta: {
      hidden: true,
      title: '登录',
      noTagsView: true
    }
  },
]

const remainingRouteryuangong: AppRouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'layout',
    children: [],
    meta: {
      hidden: true
    }
  },
  {
    path: '/',
    component: () => import('@/layout/Layout.vue'),
    name: 'Home',
    meta: {
      title: '首页',
    },
    children: [
      {
        path: '/index',
        component: () => import('@/components/Hello/index.vue'),
        name: 'Index',
        meta: {
          title: '概览'
        }
      }
    ]
  },
  {
    path: '/order',
    component: () => import('@/layout/Layout.vue'),
    name: 'order',
    meta: {
      title: '业务处理',
      icon: 'ep:monitor'
    },
    children: [
      {
        path: 'employeeDetail',
        component: () => import('@/views/tool/employeeDetail/index.vue'),
        name: 'employeeDetail',
        meta: {
          title: '1.托管业务明细',
          activeMenu: '/tool/employeeDetail'
        }
      },

      {
        path: 'negotiation',
        component: () => import('@/views/tool/negotiation/yg/index.vue'),
        name: 'negotiation',
        meta: {
          title: '2.协商任务明细',
          activeMenu: '/tool/negotiation'
        }
      },
      {
        path: 'thaw',
        component: () => import('@/views/order/thaw/yg/index.vue'),
        name: 'thaw',
        meta: {
          title: '3.解冻任务明细',
          activeMenu: '/order/thaw'
        }
      },
      {
        path: 'maintenance',
        component: () => import('@/views/tool/maintenance/index.vue'),
        name: 'maintenance',
        meta: {
          title: '4.维护任务明细',
          activeMenu: '/tool/maintenance'
        }
      },
      // {
      //   path: 'sh',
      //   component: () => import('@/components/Hello/index.vue'),
      //   name: 'sh',
      //   meta: {
      //     title: '5.售后任务明细',
      //     activeMenu: '/tool/sh'
      //   }
      // },
      // {
      //   path: 'qt',
      //   component: () => import('@/components/Hello/index.vue'),
      //   name: 'qt',
      //   meta: {
      //     title: '6.其他任务明细',
      //     activeMenu: '/tool/qt'
      //   }
      // },
      {
        path: 'outOrder',
        component: () => import('@/views/order/outOrder/index.vue'),
        name: 'outOrder',
        meta: {
          title: '5.客户问题明细',
          activeMenu: '/order/outOrder'
        }
      },
      {
        path: 'order/refundOrder',
        component: () => import('@/views/order/refundOrder/index.vue'),
        name: 'order/refundOrder',
        meta: {
          title: '6.欠费用户明细',
          hidden: false,
          activeMenu: '/order/refundOrder'
        }
      },
      // {
      //   path: 'MissePhone',
      //   component: () => import('@/views/tool/MissePhone/index.vue'),
      //   name: 'MissePhone',
      //   meta: {
      //     title: '8.周报截图明细',
      //     activeMenu: '/tool/MissePhone'
      //   }
      // },
      {
        path: 'MissePhoneNew',
        component: () => import('@/views/tool/MissePhone/IndexNew.vue'),
        name: 'MissePhoneNew',
        meta: {
          title: '7.周报截图明细',
          activeMenu: '/tool/MissePhoneNew'
        }
      },
      {
        path: 'EnumB',
        component: () => import('@/views/EnumList/EnumB/index.vue'),
        name: 'EnumB',
        meta: {
          title: '8.手机号明细',
          hidden: false,
          activeMenu: '/EnumList/EnumB'
        }
      },
      {
        path: 'agency',
        component: () => import('@/views/agency/index.vue'),
        name: 'agency',
        meta: {
          title: '9.中介资料明细',
        }
      },
      {
        path: 'kfPhone',
        component: () => import('@/views/tool/kfPhone/index.vue'),
        name: 'kfPhone',
        meta: {
          title: '客服号码明细',
          hidden: false,
          activeMenu: '/tool/kfPhone'
        }
      },
      {
        path: 'remark',
        component: () => import('@/views/tool/remark/index.vue'),
        name: 'remark',
        meta: {
          title: '10.备忘录',
        }
      }
    ]
  },
  {
    path: '/login',
    component:
      () => import('@/views/Login/Login.vue'),
    name:
      'Login',
    meta:
      {
        hidden: true,
        title:
          '登录',
        noTagsView:
          true
      }
  }
  ,
]

// 三套路由 getUserType() 1是超管 2是主管 3是员工
export default getUserType() == 1 ? remainingRouter : getUserType() == 2 ? remainingRouterzhuguan : remainingRouteryuangong
